package com.seed.fileud.pojo;

import com.seed.fileud.enumeration.FileExist;

import java.util.List;

public class FileStatus {
    private FileExist status;
    private List<Integer> chunkList;
    private String filePath;

    public FileStatus() {}

    public FileStatus(FileExist status) {
        this.status = status;
    }

    public static FileStatus yes(String filePath) {
        FileStatus status = new FileStatus(FileExist.yes);
        status.setFilePath(filePath);
        return status;
    }

    public static FileStatus no() {
        return new FileStatus(FileExist.no);
    }

    public static FileStatus all() {
        return new FileStatus(FileExist.all);
    }

    public static FileStatus part(List<Integer> chunkList) {
        FileStatus status = new FileStatus(FileExist.part);
        status.setChunkList(chunkList);
        return status;
    }

    public FileExist getStatus() {
        return status;
    }

    public FileStatus setStatus(FileExist status) {
        this.status = status;
        return this;
    }

    public List<Integer> getChunkList() {
        return chunkList;
    }

    public FileStatus setChunkList(List<Integer> chunkList) {
        this.chunkList = chunkList;
        return this;
    }

    public String getFilePath() {
        return filePath;
    }

    public FileStatus setFilePath(String filePath) {
        this.filePath = filePath;
        return this;
    }
}
